<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>限时优惠活动</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <script src="js/auth.js"></script>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        body {
            background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
            color: #333;
            line-height: 1.6;
            min-height: 100vh;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
        }

        /* 头部样式 */
        header {
            background: linear-gradient(to right, #ff6b6b, #ff8e53);
            color: white;
            padding: 20px 0;
            text-align: center;
            box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
            position: relative;
            overflow: hidden;
        }

        .header-content {
            position: relative;
            z-index: 2;
        }

        .logo {
            font-size: 2.5rem;
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
        }

        .logo i {
            margin-right: 15px;
            font-size: 3rem;
            color: #ffd700;
        }

        .tagline {
            font-size: 1.2rem;
            opacity: 0.9;
            max-width: 800px;
            margin: 0 auto;
        }

        .header-decoration {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            opacity: 0.1;
            background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="8" fill="white"/><circle cx="50" cy="50" r="5" fill="white"/><circle cx="80" cy="30" r="3" fill="white"/><circle cx="10" cy="70" r="6" fill="white"/></svg>');
        }

        /* 倒计时样式 */
        .countdown-section {
            background: #fff;
            border-radius: 15px;
            padding: 30px;
            margin: 30px auto;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
            max-width: 800px;
            text-align: center;
        }

        .section-title {
            text-align: center;
            margin-bottom: 25px;
            color: #ff6b6b;
            position: relative;
            font-size: 1.8rem;
        }

        .section-title:after {
            content: "";
            display: block;
            width: 80px;
            height: 4px;
            background: linear-gradient(to right, #ff6b6b, #ff8e53);
            margin: 10px auto;
            border-radius: 2px;
        }

        .countdown-container {
            display: flex;
            justify-content: center;
            gap: 15px;
            margin: 30px 0;
            flex-wrap: wrap;
        }

        .countdown-item {
            background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%);
            color: white;
            border-radius: 10px;
            width: 120px;
            height: 120px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            box-shadow: 0 5px 15px rgba(255, 107, 107, 0.2);
        }

        .countdown-value {
            font-size: 2.5rem;
            font-weight: 700;
        }

        .countdown-label {
            font-size: 1rem;
            opacity: 0.9;
        }

        /* 优惠券样式 */
        .coupons-section {
            padding: 40px 0;
        }

        .coupons-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 30px;
            margin-top: 30px;
        }

        .coupon-card {
            background: #fff;
            border-radius: 15px;
            overflow: hidden;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
            display: flex;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            position: relative;
        }

        .coupon-card:hover {
            transform: translateY(-10px);
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
        }

        .coupon-discount {
            background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
            color: white;
            width: 120px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            padding: 20px;
            position: relative;
        }

        .coupon-discount::after {
            content: "";
            position: absolute;
            top: 0;
            bottom: 0;
            right: -10px;
            width: 20px;
            background:
                    radial-gradient(circle at 0 50%, transparent 10px, #fff 10.5px) top,
                    radial-gradient(circle at 0 50%, transparent 10px, #fff 10.5px) bottom;
            background-size: 20px 50%;
            background-repeat: no-repeat;
        }

        .discount-value {
            font-size: 2.2rem;
            font-weight: 800;
            line-height: 1;
        }

        .discount-text {
            font-size: 1rem;
            font-weight: 600;
        }

        .coupon-details {
            padding: 20px;
            flex-grow: 1;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }

        .coupon-title {
            font-size: 1.3rem;
            color: #ff6b6b;
            margin-bottom: 10px;
            font-weight: 700;
        }

        .coupon-desc {
            color: #666;
            font-size: 0.95rem;
            margin-bottom: 15px;
            flex-grow: 1;
        }

        .coupon-code {
            background: #f8f9fa;
            padding: 8px 15px;
            border-radius: 30px;
            font-weight: 600;
            color: #ff6b6b;
            display: inline-block;
            margin-top: 10px;
            font-size: 0.9rem;
        }

        .btn-claim {
            background: #4CAF50;
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 30px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            display: block;
            width: 100%;
            margin-top: 15px;
        }

        .btn-claim:hover {
            background: #45a049;
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
        }

        /* 活动展示区 */
        .promotions-section {
            background: #fff;
            border-radius: 15px;
            padding: 40px;
            margin: 40px auto;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
        }

        .promotions-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 30px;
            margin-top: 30px;
        }

        .promo-card {
            background: #f8f9fa;
            border-radius: 15px;
            overflow: hidden;
            transition: all 0.3s ease;
            position: relative;
        }

        .promo-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
        }

        .promo-image {
            height: 180px;
            overflow: hidden;
            position: relative;
        }

        .promo-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.5s ease;
        }

        .promo-card:hover .promo-image img {
            transform: scale(1.05);
        }

        .promo-badge {
            position: absolute;
            top: 15px;
            right: 15px;
            background: #ff6b6b;
            color: white;
            padding: 5px 15px;
            border-radius: 20px;
            font-weight: 600;
            font-size: 0.9rem;
        }

        .promo-content {
            padding: 20px;
        }

        .promo-title {
            font-size: 1.2rem;
            color: #333;
            margin-bottom: 10px;
            font-weight: 700;
        }

        .promo-desc {
            color: #666;
            font-size: 0.95rem;
            margin-bottom: 15px;
        }

        .promo-date {
            color: #ff6b6b;
            font-size: 0.9rem;
            font-weight: 600;
        }

        /* 页脚样式 */
        footer {
            background: linear-gradient(to right, #434343, #000000);
            color: #f0e6d8;
            padding: 40px 0 20px;
            margin-top: 60px;
        }

        .footer-content {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 30px;
            margin-bottom: 30px;
        }

        .footer-column h3 {
            font-size: 1.3rem;
            margin-bottom: 20px;
            color: #ff6b6b;
            position: relative;
            padding-bottom: 10px;
        }

        .footer-column h3::after {
            content: "";
            position: absolute;
            bottom: 0;
            left: 0;
            width: 40px;
            height: 3px;
            background: #ff6b6b;
        }

        .footer-links {
            list-style: none;
        }

        .footer-links li {
            margin-bottom: 12px;
        }

        .footer-links a {
            color: #ccc;
            text-decoration: none;
            transition: color 0.3s ease;
            display: flex;
            align-items: center;
        }

        .footer-links a i {
            margin-right: 10px;
            width: 20px;
            text-align: center;
        }

        .footer-links a:hover {
            color: #ff6b6b;
        }

        .contact-info p {
            margin-bottom: 12px;
            display: flex;
            align-items: center;
        }

        .contact-info i {
            margin-right: 10px;
            width: 20px;
            color: #ff6b6b;
        }

        .social-links {
            display: flex;
            gap: 15px;
            margin-top: 20px;
        }

        .social-links a {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: #333;
            color: white;
            font-size: 1.2rem;
            transition: all 0.3s ease;
        }

        .social-links a:hover {
            background: #ff6b6b;
            transform: translateY(-5px);
        }

        .copyright {
            text-align: center;
            padding-top: 20px;
            border-top: 1px solid #444;
            color: #aaa;
            font-size: 0.9rem;
        }

        /* 响应式设计 */
        @media (max-width: 768px) {
            .countdown-item {
                width: 100px;
                height: 100px;
            }

            .countdown-value {
                font-size: 2rem;
            }

            .coupons-grid {
                grid-template-columns: 1fr;
            }

            .promotions-section {
                padding: 30px 20px;
            }
        }

        @media (max-width: 480px) {
            .logo {
                font-size: 2rem;
            }

            .countdown-item {
                width: 80px;
                height: 80px;
            }

            .countdown-value {
                font-size: 1.5rem;
            }
        }
    </style>
</head>
<body data-require-login="true">
<!-- 头部区域 -->
<header>
    <div class="header-decoration"></div>
    <div class="container header-content">
        <div class="logo">
            <i class="fas fa-tags"></i>
            限时优惠狂欢节
        </div>
        <p class="tagline">超值优惠、惊喜折扣、专属福利，错过再等一年！</p>
    </div>
</header>

<!-- 倒计时区域 -->
<div class="container">
    <div class="countdown-section">
        <h2 class="section-title">活动结束倒计时</h2>
        <div class="countdown-container">
            <div class="countdown-item">
                <div class="countdown-value" id="days">09</div>
                <div class="countdown-label">天</div>
            </div>
            <div class="countdown-item">
                <div class="countdown-value" id="hours">23</div>
                <div class="countdown-label">时</div>
            </div>
            <div class="countdown-item">
                <div class="countdown-value" id="minutes">45</div>
                <div class="countdown-label">分</div>
            </div>
            <div class="countdown-item">
                <div class="countdown-value" id="seconds">30</div>
                <div class="countdown-label">秒</div>
            </div>
        </div>
        <p>活动期间所有优惠券均可领取，数量有限，先到先得！</p>
    </div>

    <!-- 优惠券区域 -->
    <section class="coupons-section">
        <h2 class="section-title">优惠券领取</h2>
        <div class="coupons-grid">
            <!-- 优惠券1 -->
            <div class="coupon-card">
                <div class="coupon-discount">
                    <div class="discount-value">¥50</div>
                    <div class="discount-text">满减券</div>
                </div>
                <div class="coupon-details">
                    <div>
                        <h3 class="coupon-title">新用户专享礼券</h3>
                        <p class="coupon-desc">新注册用户专享，满300元立减50元，全品类可用</p>
                        <span class="coupon-code">优惠码: NEW50</span>
                    </div>
                    <button class="btn-claim">立即领取</button>
                </div>
            </div>

            <!-- 优惠券2 -->
            <div class="coupon-card">
                <div class="coupon-discount">
                    <div class="discount-value">7折</div>
                    <div class="discount-text">折扣券</div>
                </div>
                <div class="coupon-details">
                    <div>
                        <h3 class="coupon-title">夏季狂欢折扣券</h3>
                        <p class="coupon-desc">指定夏季商品7折优惠，最高可省200元</p>
                        <span class="coupon-code">优惠码: SUMMER70</span>
                    </div>
                    <button class="btn-claim">立即领取</button>
                </div>
            </div>

            <!-- 优惠券3 -->
            <div class="coupon-card">
                <div class="coupon-discount">
                    <div class="discount-value">¥100</div>
                    <div class="discount-text">满减券</div>
                </div>
                <div class="coupon-details">
                    <div>
                        <h3 class="coupon-title">超级会员专享券</h3>
                        <p class="coupon-desc">会员专享，满500元立减100元，可与会员折扣叠加</p>
                        <span class="coupon-code">优惠码: VIP100</span>
                    </div>
                    <button class="btn-claim">立即领取</button>
                </div>
            </div>
        </div>
    </section>

    <!-- 活动展示区 -->
    <section class="promotions-section">
        <h2 class="section-title">热门优惠活动</h2>
        <div class="promotions-grid">
            <!-- 活动1 -->
            <div class="promo-card">
                <div class="promo-image">
                    <div style="background:linear-gradient(to right, #4facfe 0%, #00f2fe 100%); height:100%; display:flex; align-items:center; justify-content:center; color:white; font-size:1.5rem; font-weight:bold;">
                        限时秒杀
                    </div>
                    <div class="promo-badge">火热进行中</div>
                </div>
                <div class="promo-content">
                    <h3 class="promo-title">每日10点限时秒杀</h3>
                    <p class="promo-desc">每天上午10点准时开抢，爆款商品低至5折</p>
                    <p class="promo-date">活动时间: 即日起至8月31日</p>
                </div>
            </div>

            <!-- 活动2 -->
            <div class="promo-card">
                <div class="promo-image">
                    <div style="background:linear-gradient(to right, #ff9a9e 0%, #fad0c4 100%); height:100%; display:flex; align-items:center; justify-content:center; color:white; font-size:1.5rem; font-weight:bold;">
                        买一送一
                    </div>
                    <div class="promo-badge">新品活动</div>
                </div>
                <div class="promo-content">
                    <h3 class="promo-title">精选商品买一送一</h3>
                    <p class="promo-desc">指定商品第二件0元，多买多送，不限数量</p>
                    <p class="promo-date">活动时间: 即日起至7月31日</p>
                </div>
            </div>

            <!-- 活动3 -->
            <div class="promo-card">
                <div class="promo-image">
                    <div style="background:linear-gradient(to right, #6a11cb 0%, #2575fc 100%); height:100%; display:flex; align-items:center; justify-content:center; color:white; font-size:1.5rem; font-weight:bold;">
                        积分翻倍
                    </div>
                    <div class="promo-badge">会员专享</div>
                </div>
                <div class="promo-content">
                    <h3 class="promo-title">会员积分翻倍活动</h3>
                    <p class="promo-desc">活动期间会员消费可享双倍积分，积分可兑换好礼</p>
                    <p class="promo-date">活动时间: 7月1日-7月31日</p>
                </div>
            </div>
        </div>
    </section>
</div>

<!-- 页脚区域 -->
<footer>
    <div class="container">
        <div class="footer-content">
            <div class="footer-column">
                <h3>关于我们</h3>
                <ul class="footer-links">
                    <li><a href="#"><i class="fas fa-angle-right"></i> 公司简介</a></li>
                    <li><a href="#"><i class="fas fa-angle-right"></i> 发展历程</a></li>
                    <li><a href="#"><i class="fas fa-angle-right"></i> 团队介绍</a></li>
                    <li><a href="#"><i class="fas fa-angle-right"></i> 加入我们</a></li>
                </ul>
            </div>

            <div class="footer-column">
                <h3>客户服务</h3>
                <ul class="footer-links">
                    <li><a href="#"><i class="fas fa-angle-right"></i> 帮助中心</a></li>
                    <li><a href="#"><i class="fas fa-angle-right"></i> 常见问题</a></li>
                    <li><a href="#"><i class="fas fa-angle-right"></i> 售后服务</a></li>
                    <li><a href="#"><i class="fas fa-angle-right"></i> 意见反馈</a></li>
                </ul>
            </div>

            <div class="footer-column">
                <h3>联系我们</h3>
                <div class="contact-info">
                    <p><i class="fas fa-map-marker-alt"></i> 北京市朝阳区商务中心88号</p>
                    <p><i class="fas fa-phone"></i> 400-888-9999</p>
                    <p><i class="fas fa-envelope"></i> contact@promo.com</p>
                    <p><i class="fas fa-clock"></i> 周一至周五: 9:00 - 18:00</p>
                </div>
                <div class="social-links">
                    <a href="#"><i class="fab fa-weixin"></i></a>
                    <a href="#"><i class="fab fa-weibo"></i></a>
                    <a href="#"><i class="fab fa-qq"></i></a>
                    <a href="#"><i class="fab fa-tiktok"></i></a>
                </div>
            </div>
        </div>
        <div class="copyright">
            <p>© 2023 优惠活动平台 版权所有 | 设计开发: 前端技术团队</p>
        </div>
    </div>
</footer>

<script>
    // 倒计时功能
    function updateCountdown() {
        // 设置活动结束时间（7天后）
        const endDate = new Date();
        endDate.setDate(endDate.getDate() + 7);

        const now = new Date();
        const timeDiff = endDate - now;

        // 计算剩余时间
        const days = Math.floor(timeDiff / (1000 * 60 * 60 * 24));
        const hours = Math.floor((timeDiff % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
        const minutes = Math.floor((timeDiff % (1000 * 60 * 60)) / (1000 * 60));
        const seconds = Math.floor((timeDiff % (1000 * 60)) / 1000);

        // 更新显示
        document.getElementById('days').textContent = days.toString().padStart(2, '0');
        document.getElementById('hours').textContent = hours.toString().padStart(2, '0');
        document.getElementById('minutes').textContent = minutes.toString().padStart(2, '0');
        document.getElementById('seconds').textContent = seconds.toString().padStart(2, '0');
    }

    // 初始调用
    updateCountdown();
    // 每秒更新一次
    setInterval(updateCountdown, 1000);

    // 优惠券领取功能
    const claimButtons = document.querySelectorAll('.btn-claim');

    claimButtons.forEach(button => {
        button.addEventListener('click', function() {
            const couponCard = this.closest('.coupon-card');
            const couponTitle = couponCard.querySelector('.coupon-title').textContent;

            // 改变按钮状态
            this.textContent = '已领取';
            this.style.background = '#9e9e9e';
            this.disabled = true;

            // 添加动画效果
            this.style.transform = 'scale(0.95)';
            setTimeout(() => {
                this.style.transform = '';
            }, 300);

            // 显示领取成功消息
            alert(`成功领取优惠券: ${couponTitle}`);
        });
    });

    // 页面滚动效果
    window.addEventListener('scroll', function() {
        const header = document.querySelector('header');
        if (window.scrollY > 50) {
            header.style.padding = '10px 0';
        } else {
            header.style.padding = '20px 0';
        }
    });
</script>
</body>
</html>